package com.ftg.product.kucun.mapper;

import com.ftg.product.kucun.pojo.Chuku;
import com.ftg.product.kucun.pojo.Ruku;
import org.apache.ibatis.annotations.*;

import java.util.List;

/**
 * @author zwl
 * Create on 2019/5/7 13:45
 * function
 */
@Mapper
public interface RukuMapper {
    @Select("select * from ruku")
    List<Ruku> showall(Ruku pageH);
    @Select("select * from ruku where rname like \"%\"#{write}\"%\"")
    List<Ruku> show(Ruku pageH);
    @Insert("insert into ruku(rname,rsum,rumt,rprice,rpeople,radress,rdate) values(#{rname},#{rsum},#{rumt},#{rprice},#{rpeople},#{radress},#{rdate})")
    public int insert(Ruku ruku);
    @Update("update ruku set rname=#{rname},rsum=#{rsum},rumt=#{rumt},rprice=#{rprice},rpeople=#{rpeople},radress=#{radress},rdate=#{rdate} where rid=#{rid}")
    public int update(Ruku ruku);
    @Delete("delete from ruku where rid=#{rid}")
    public int delete(String rid);
}
